
from redis import StrictRedis




class Config(object):
    DEBUG = None

    SECRET_KEY = 'heyKyqaUgg8jAJJvjwxy3bUCkBFBX5ao3kK0HLptbW8='


    SQLALCHEMY_DATABASE_URI = 'mysql://root:mysql@localhost/python2'

    #配置数据库动态信息
    SQLALCHEMY_TRACK_MODIFICATIONS = False


    REDIS_HOST = '127.0.0.1'
    REDIS_PORT = 6379

    SESSION_TYPE = 'redis'

    SESSION_USE_SIGNER = True

    SESSION_REDIS = StrictRedis(host=REDIS_HOST, port=REDIS_PORT)


    PERMANENT_SESSION_LIFETIME = 86400


class developmentConfig(Config):
    DEBUG = True

class productionConfig(Config):
    DEBUG = False


config_dict = {
    'development':developmentConfig,
    'production':productionConfig
}

